<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>继承</title>
	</head>
	<body>
	<script type="text/javascript">
		function Person(){
			this.nation="汉族";
			this.skinColor="黄色";
		}
		Person.prototype.mingzu=function(){
			return this.nation;
		}
		Person.prototype.fuse=function(){
			return this.skinColor;
		}
		function Woman(){
			
		}
		Woman.prototype=new Person();
		Woman.prototype.sex="女";
		Woman.prototype.xingbie=function(){
			return this.sex;
		}
		var man=new Woman();
		document.write("名族："+man.mingzu()+"<br />");
		document.write("肤色："+man.fuse()+"<br />");
		document.write("性别："+man.xingbie());
		
	</script>
	</body>
</html>
